//
//  ZWFirstCollectionViewCell.m
//  WanEr
//
//  Created by 高文萍 on 16/1/14.
//  Copyright © 2016年 ziwokeji. All rights reserved.
//

#import "ZWFirstCollectionViewCell.h"
#import "ZWHeader.h"
@implementation ZWFirstCollectionViewCell

- (instancetype)initWithFrame:(CGRect)frame
{
    if (self == [super initWithFrame:frame]) {
        self.firstImg = [[UIImageView alloc]init];
        [self  addSubview:self.firstImg];
        
        self.cityLabel = [[UILabel alloc]init];
        [self addSubview:self.cityLabel];
        self.cityLabel.font = [UIFont fontWithName:@"ArialMT" size:16];
        self.cityLabel.adjustsFontSizeToFitWidth =YES;// 自动调整字体尺寸
        self.cityLabel.textColor = [UIColor colorWithWhite:0.096 alpha:1.000];
        
        self.describeLabel = [[UILabel alloc]init];
        self.describeLabel.font= [UIFont fontWithName:@"ArialMT" size:14];
        self.describeLabel.lineBreakMode = NSLineBreakByTruncatingMiddle;//省略中间文字
        self.describeLabel.adjustsFontSizeToFitWidth =YES;
        self.describeLabel.textColor = [UIColor colorWithWhite:0.522 alpha:1.000];
        [self addSubview:self.describeLabel];
    }
    
    return self;
}

- (void)layoutSubviews
{
    [super layoutSubviews];
    self.firstImg.frame = CGRectMake(0, 0, CONTENTWIDTH, CONTENTWIDTH);
    self.cityLabel.frame = CGRectMake(0, CONTENTWIDTH + 10, CONTENTWIDTH, 25);
    self.describeLabel.frame = CGRectMake(0, self
                                          .firstImg.frame.size.height + 25 + 10 + 2, CONTENTWIDTH, 15);
}

@end
